home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / standard / libsphere.z / libsphere
Encoding:
Text File  |  2002-10-03  |  6.5 KB  |  133 lines

  1.  
  2.  
  3.  
  4. LLLLIIIIBBBBSSSSPPPPHHHHEEEERRRREEEE((((3333LLLL))))                                                    LLLLIIIIBBBBSSSSPPPPHHHHEEEERRRREEEE((((3333LLLL))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      lllliiiibbbbsssspppphhhheeeerrrreeee - the Sphere Library
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ggggllll////sssspppphhhheeeerrrreeee....hhhh>>>>
  13.  
  14.           iiiinnnntttt sssspppphhhhddddrrrraaaawwww((((ppppaaaarrrraaaammmmssss))))
  15.           ffffllllooooaaaatttt ppppaaaarrrraaaammmmssss[[[[4444]]]];;;;
  16.  
  17.           iiiinnnntttt sssspppphhhhggggnnnnppppoooollllyyyyssss((((vvvvooooiiiidddd))))
  18.  
  19.           vvvvooooiiiidddd sssspppphhhhffffrrrreeeeeeee((((vvvvooooiiiidddd))))
  20.  
  21.           iiiinnnntttt sssspppphhhhmmmmooooddddeeee((((aaaattttttttrrrriiiibbbbuuuutttteeee,,,, vvvvaaaalllluuuueeee))))
  22.           iiiinnnntttt aaaattttttttrrrriiiibbbbuuuutttteeee,,,, vvvvaaaalllluuuueeee;;;;
  23.  
  24.           vvvvooooiiiidddd sssspppphhhhoooobbbbjjjj((((oooobbbbjjjjiiiidddd))))
  25.           OOOObbbbjjjjeeeecccctttt oooobbbbjjjjiiiidddd;;;;
  26.  
  27.           vvvvooooiiiidddd sssspppphhhhrrrroooottttmmmmaaaattttrrrriiiixxxx((((mmmmaaaatttt))))
  28.           MMMMaaaattttrrrriiiixxxx mmmmaaaatttt;;;;
  29.  
  30.           vvvvooooiiiidddd sssspppphhhhbbbbggggnnnnbbbbiiiittttmmmmaaaapppp((((vvvvooooiiiidddd))))
  31.  
  32.           vvvvooooiiiidddd sssspppphhhheeeennnnddddbbbbiiiittttmmmmaaaapppp((((vvvvooooiiiidddd))))
  33.  
  34.           vvvvooooiiiidddd sssspppphhhhccccoooolllloooorrrr((((ccccllllrrrr))))
  35.           ffffllllooooaaaatttt ccccllllrrrr[[[[4444]]]];;;;
  36.  
  37. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  38.      The Sphere Library renders spheres by issuing GL calls.  sssspppphhhhddddrrrraaaawwww draws a
  39.      sphere.  sssspppphhhhmmmmooooddddeeee sets various attributes that affect the speed and
  40.      quality of spheres rendered by sssspppphhhhddddrrrraaaawwww. sssspppphhhhrrrroooottttmmmmaaaattttrrrriiiixxxx allows you to
  41.      control the orientation of spheres by providing a rotation matrix.
  42.      sssspppphhhhggggnnnnppppoooollllyyyyssss returns the number of polygons per sphere, in the mode
  43.      currently selected by sssspppphhhhmmmmooooddddeeee.  sssspppphhhhoooobbbbjjjj  operates like sssspppphhhhddddrrrraaaawwww, except
  44.      that, instead of immediately rendering a sphere, it creates and returns a
  45.      GL object, which can be rendered using ccccaaaalllllllloooobbbbjjjj.  The routines
  46.      sssspppphhhhbbbbggggnnnnbbbbiiiittttmmmmaaaapppp and sssspppphhhheeeennnnddddbbbbiiiittttmmmmaaaapppp are for drawing collections of spheres
  47.      using a special bitmap image of a phong-shaded sphere.  The diffuse color
  48.      of the bitmap spheres are set with the routine sssspppphhhhccccoooolllloooorrrr.
  49.  
  50. UUUUSSSSAAAAGGGGEEEE
  51.      To link a program with libsphere, specify ----llllsssspppphhhheeeerrrreeee on the compile line.
  52.      When linking a program with libsphere, you must also specify the Graphics
  53.      Library, ----llllggggllll____ssss, and the Math Library, ----llllmmmm.
  54.  
  55. CCCCAAAAVVVVEEEEAAAATTTT
  56.      In the current implementation, the Sphere Library maintains an internal
  57.      cache of GL objects, one for each combination of sphere attributes for
  58.      which sssspppphhhhddddrrrraaaawwww or sssspppphhhhoooobbbbjjjj has been called.  The first call to sssspppphhhhddddrrrraaaawwww, or
  59.      sssspppphhhhoooobbbbjjjj, with a combination of attributes that has not yet been rendered
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. LLLLIIIIBBBBSSSSPPPPHHHHEEEERRRREEEE((((3333LLLL))))                                                    LLLLIIIIBBBBSSSSPPPPHHHHEEEERRRREEEE((((3333LLLL))))
  71.  
  72.  
  73.  
  74.      will result in the creation of a new GL object and, thus, will take
  75.      longer than subsequent calls with the same combination of sphere
  76.      attributes.
  77.  
  78.      If your program uses the Sphere Library and also manipulates its own GL
  79.      objects, you must be careful that your allocation of object identifiers
  80.      does not conflict with the Sphere Library's allocation of object
  81.      identifiers for its internal cache.  The Sphere Library calls ggggeeeennnnoooobbbbjjjj for
  82.      its object identifier allocation.  If your program allocates object
  83.      identifiers for its own use, you should either use ggggeeeennnnoooobbbbjjjj to allocate
  84.      object identifiers or use iiiissssoooobbbbjjjj to verify that any object identifiers
  85.      your program generates are not already being used by the Sphere Library.
  86.      See _m_a_k_e_o_b_j(3g) and _g_e_n_o_b_j(3g) for further discussion of object
  87.      identifiers.
  88.  
  89.      If you need to free the virtual memory used by the Sphere Library's
  90.      internal cache, you can call sssspppphhhhffffrrrreeeeeeee to free all its GL objects and their
  91.      associated memory.
  92.  
  93. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  94.      sphdraw, sphgnpolys, sphfree, sphmode, sphobj, sphrotmatrix,
  95.      sphbgnbitmap, , sphendbitmap, sphcolor
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.